﻿@model PessMvc.Models.ACLModel

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

@using(Html.BeginForm("Index","ActivityACL",FormMethod.Post))
{
    <p>
    @Html.DropDownList("activityID", Model.ActivitySelectList)
    </p>
    <input type="submit" value="1.选择活动" />
}
@using (Html.BeginForm("ChooseACLMembers","ActivityACL",FormMethod.Post))
{
    @Html.Hidden("ActivityID", Model.SelectedActivityID)
    <input type="submit" value="2.添加可访问用户"   />
}
@using(Html.BeginForm("RemoveACLMembers","ActivityACL",FormMethod.Post))
{
    @Html.Hidden("ActivityID", Model.SelectedActivityID)
    @Html.Partial("_ACLMembersPartial",new ViewDataDictionary(Model.ACLMembers))
    <input type="submit" value="Remove ACL Members"   />
}

@*<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Author.RealName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Activity.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.SecurityClearance)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Author.RealName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Activity.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.SecurityClearance)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
            @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
        </td>
    </tr>
}

</table>*@
